<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

/*
| -------------------------------------------------------------------
| Logout
| -------------------------------------------------------------------
| Destroys current session.
|
| Redirects to auth_form (login form)
|
|
*/

class Logout extends CI_Controller {

	function __construct()
	{
		parent::__construct();	
        $this->load->helper('url_helper');
        $this->load->helper('form_helper');
        $this->load->library('session');
        $this->config->load('auth/AuthenticatedControllerConfig');
		$this->session->sess_destroy();
		redirect($this->config->item('auth_form'), 'refresh');
	}
	
}
